package fr.sportcom.sportcom.model;

import fr.sportcom.sportcom.R;
import fr.sportcom.sportcom.controller.CreateEventActivity;
import fr.sportcom.sportcom.controller.CreateUserActivity;
import fr.sportcom.sportcom.controller.EventListActivity;
import fr.sportcom.sportcom.controller.FriendListActivity;
import fr.sportcom.sportcom.controller.MapSponsorActivity;
import fr.sportcom.sportcom.controller.SettingsActivity;
import android.content.Context;
import android.content.Intent;
import android.view.MenuItem;

public class UserPanel {
	
	public static boolean panelOption (MenuItem item, Context c) {
		switch (item.getItemId()) {
		case R.id.panel_my_profil: {
			Intent intentEvent = CreateUserActivity.prepareIntent(c, CreateUserActivity.EDIT, null);
			c.startActivity(intentEvent);
			return true;
		}
		case R.id.panel_my_event: {
			Intent intentEvent = EventListActivity.prepareIntent(c, EventListActivity.USER, null);
			c.startActivity(intentEvent);
			return true;
		}
		case R.id.panel_new_event: {
			Intent intentEvent = CreateEventActivity.prepareIntent(c, CreateEventActivity.CREAT, null);
			c.startActivity(intentEvent);
			return true;
		}
		case R.id.panel_friend: {
			Intent intentEvent = FriendListActivity.prepareIntent(c, FriendListActivity.VIEW, null);
			c.startActivity(intentEvent);
			return true;
		}
		case R.id.panel_map: {
			Intent intentEvent = new Intent(c, MapSponsorActivity.class);
			c.startActivity(intentEvent);
			return true;
		}
		case R.id.panel_setting: {
			Intent intentEvent = new Intent(c, SettingsActivity.class);
			c.startActivity(intentEvent);
			return true;
		}
		default:
			return false;
		}

	}
}
